package flyWeightPattern;

//具体的棋子类---具体享元类（内部状态）
public class ConcreteChessPiece implements ChessPiece {

    private String type;

    public ConcreteChessPiece(String type) {
        this.type = type;
    }

    public String getType() {
        return type;
    }


    @Override
    public void display(Position position) {
        System.out.println("棋子类型：" + type);
        System.out.println("棋子位置：" + position.toString());
    }
}
